package com.java1234.view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

import chrriis.dj.nativeswing.swtimpl.components.JWebBrowser;

import javax.swing.JTextField;
import javax.swing.JButton;

public class MMain extends JFrame {
	 private JPanel webBrowserPanel;
	 
	    private JWebBrowser webBrowser;
	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
//	public static void main(String[] args) {
//		EventQueue.invokeLater(new Runnable() {
//			public void run() {
//				try {
//					MMain frame = new MMain();
//					frame.setVisible(true);
//				} catch (Exception e) {
//					e.printStackTrace();
//				}
//			}
//		});
//	}

	/**
	 * Create the frame.
	 */
	public MMain(String url) {
		System.out.printf(url);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		
		JPanel panel_1 = new JPanel();
		panel_1.setEnabled(isEnabled());
		
		webBrowserPanel = new JPanel(new BorderLayout());
		contentPane.add(panel_1, BorderLayout.CENTER);
		//panel_1.add(new Main(url), BorderLayout.CENTER);
		
		webBrowser = new JWebBrowser();
        webBrowser.navigate(url);
//        webBrowser.setButtonBarVisible(false);
//        webBrowser.setMenuBarVisible(false);
//        webBrowser.setBarsVisible(false);
//        webBrowser.setStatusBarVisible(false);
        panel_1.add(webBrowser, BorderLayout.CENTER);
	}

}
